package com.firmail.enumeration.impl;

import com.firmail.enumeration.MockParamsEnum;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

@Getter
@Slf4j
public enum MajorTypeEnum implements MockParamsEnum {
    HR("人资专业","OIS_HR"),MM("物资专业","OIS_MM"),MK("营销专业","OIS_MM"),TT("测试专业","OIS_TT"),
    PM("项目专业","OIS_PM"),FC("财务专业","OIS_FC"),AE("其他专业","OIS_AE");

    String value;
    String name;

    MajorTypeEnum(String name,  String value) {
        this.value=value;
        this.name=name;
    }


    public static MajorTypeEnum getByValue(String value){
        for (MajorTypeEnum dataTpe: MajorTypeEnum.values()) {
            if (value.equals(dataTpe.getValue()))
                return dataTpe;
        }
        return null;
    }

    public static String getName(String  value){
        for (MajorTypeEnum dataTpe: MajorTypeEnum.values()) {
            if (value.equals(dataTpe.getValue()))
                return dataTpe.name;
        }
        return null;
    }

    @Override
    public void print() {
        log.info("{} :{}", this.value, this.name);
    }

    @Override
    public String getInfo() {
        return this.name;
    }
}